package com.wangmengtao.upms.service.impl;

import com.wangmengtao.upms.dao.UpmsDeptDao;
import com.wangmengtao.upms.model.UpmsDept;
import com.wangmengtao.upms.service.UpmsDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.*;

/**
 * @ClassName: UpmsOrganizationServiceImpl
 * @Description: TODO
 * @Author: WangMengtao
 * @Data: 2019/6/5 17:15
 * @Version: 1.0.0
 */
@Service
public class UpmsDeptServiceImpl implements UpmsDeptService {

    @Autowired
    private UpmsDeptDao upmsDeptDao;

    @Override
    public int insert(UpmsDept upmsDept) {
        return upmsDeptDao.insert(upmsDept);
    }

    @Override
    public int deleteById(Long id) {
        return upmsDeptDao.deleteById(id);
    }

    @Override
    public int update(UpmsDept upmsDept) {
        return upmsDeptDao.update(upmsDept);

    }

    @Override
    public int deleteByIds(List<Long> ids) {
        return 0;
    }

    @Override
    public UpmsDept getById(Long id) {
        return upmsDeptDao.getById(id);
    }

    @Override
    public List<UpmsDept> list() {
        return upmsDeptDao.list();
    }

    @Override
    public List<UpmsDept> listByParentId(Long parentId) {
        return upmsDeptDao.listByParentId(parentId);
    }
}
